package com.new_wear.project.system.volunteer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.new_wear.project.system.volunteer.mapper.CstVolunteerMapper;
import com.new_wear.project.system.volunteer.domain.CstVolunteer;
import com.new_wear.project.system.volunteer.service.ICstVolunteerService;
import com.new_wear.common.utils.text.Convert;

/**
 * 系统 - 志愿者Service业务层处理
 * 
 * @author new_wear
 * @date 2019-12-31
 */
@Service
public class CstVolunteerServiceImpl implements ICstVolunteerService 
{
    @Autowired
    private CstVolunteerMapper cstVolunteerMapper;

    /**
     * 查询系统 - 志愿者
     * 
     * @param id 系统 - 志愿者ID
     * @return 系统 - 志愿者
     */
    @Override
    public CstVolunteer selectCstVolunteerById(Integer id)
    {
        return cstVolunteerMapper.selectCstVolunteerById(id);
    }

    /**
     * 查询系统 - 志愿者列表
     * 
     * @param cstVolunteer 系统 - 志愿者
     * @return 系统 - 志愿者
     */
    @Override
    public List<CstVolunteer> selectCstVolunteerList(CstVolunteer cstVolunteer)
    {
        return cstVolunteerMapper.selectCstVolunteerList(cstVolunteer);
    }

    /**
     * 新增系统 - 志愿者
     * 
     * @param cstVolunteer 系统 - 志愿者
     * @return 结果
     */
    @Override
    public int insertCstVolunteer(CstVolunteer cstVolunteer)
    {
        return cstVolunteerMapper.insertCstVolunteer(cstVolunteer);
    }

    /**
     * 修改系统 - 志愿者
     * 
     * @param cstVolunteer 系统 - 志愿者
     * @return 结果
     */
    @Override
    public int updateCstVolunteer(CstVolunteer cstVolunteer)
    {
        return cstVolunteerMapper.updateCstVolunteer(cstVolunteer);
    }

    /**
     * 删除系统 - 志愿者对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCstVolunteerByIds(String ids)
    {
        return cstVolunteerMapper.deleteCstVolunteerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除系统 - 志愿者信息
     * 
     * @param id 系统 - 志愿者ID
     * @return 结果
     */
    @Override
    public int deleteCstVolunteerById(Integer id)
    {
        return cstVolunteerMapper.deleteCstVolunteerById(id);
    }
}
